import sys
from django.conf.urls.defaults import *

sys.path.append('/home/jchung21/django.ga2oo.com')
sys.path.append('/home/jchung21/django.ga2oo.com/django-rest-interface')


from django_restapi.model_resource import Collection
from django_restapi.responder import *
from django_restapi.receiver import *
from gausers.models import Gauser


# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
"""
gauser_xml_resource = Collection(
    queryset = Gauser.objects.all(),
    permitted_methods= ('GET', 'POST', 'PUT', 'DELETE'),
    expose_fields = ('id', 'firstname', 'lastname', 'email'),
    responder = XMLResponder(),
    receiver = XMLReceiver()
)

gauser_json_resource = Collection(
    queryset = Gauser.objects.all(),
    expose_fields = ('id', 'firstname', 'lastname', 'email'),
    responder = JSONResponder(),
    receiver = JSONReceiver()
)

"""
urlpatterns = patterns('',
    # Example:
    #(r'^admintest/', include('admintest.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),
    url(r'', include('admintest.api_calls.usercall')),
    url(r'', include('admintest.api_calls.eventcall')),
    #url(r'^xml/gauser/(.*?)/?$', gauser_xml_resource),
    #url(r'^json/gauser/(.*?)/?$', gauser_json_resource),
)
